{% if __SELF__.tags|length > 0 %}
    <ul class="tag-list">
        {% for tag in tags %}
            {% set postCount = tag.post_count %}
            <li>
                <a href="{{ tag.url }}">{{ tag.title | default(tag.slug | title) }}</a> 
                {% if postCount %}
                    <span class="badge">{{ postCount }}</span>
                {% endif %}
            </li>
        {% endfor %}
    </ul>
{% else %}
    <p>No tags were found.</p>
{% endif %}
